package com.nf.controller;

import com.google.gson.Gson;
import com.nf.dao.SeatInfoDao;
import com.nf.dao.impl.SeatInfoDaoImpl;
import com.nf.entity.SeatInfo;

import java.util.ArrayList;
import java.util.List;

class User {
    String name ;
    int age ;

    public User(String name,int age) {
        this.name = name ;
        this.age = age ;
    }
}

public class MainTest {
    public static void main(String[] args) {

 //       for (SeatInfo s:list){
//            if(s.getSeatRow()==1){
//                arr[0][0]=(SeatInfo) s;
//            }
  //          System.out.println((SeatInfo)s);
//            for(int i = 0;i<arr.length;i++){
//                //里层循环的次数是每一个一维数组元素的个数
//                for(int j = 0;i<arr[i].length;j++){
//                    if(s.getSeatRow()==i+1){
////                        arr[i][j]=s;
//                        System.out.println(s.getSeatId());
//                    }
//                }
//            }
      //  }



        //外层循环的次数是二维数组中一维数组的的个数  普通for循环

        // select distinct show_data from showInfo where film_id=1;

        // List<日期> -- > 3


        User[][] uu = new User[2][] ;

        // showInfo[][] si = new showInfo[list.size()][] ;



        // select * from  showInfo where show_data = ?; -- list

        //r1
        User u1 = new User("zs",1) ;
        User u2 = new User("zs",1) ;
        User u3 = new User("zs",1) ;
        User[] u11 = {u1,u2,u3} ;

        //r2
        User u4 = new User("ls",1) ;
        User u5 = new User("ls",1) ;
        User u6 = new User("ls",1) ;

        User[] u12 = {u4,u5,u6} ;
        System.out.println(new Gson().toJson(u12));

        uu[0] = u11 ;
        uu[1] = u12 ;





        Gson gson = new Gson();
        String json = gson.toJson(uu) ;
        System.out.println(json);

    }
}
